package com.easyadmin.pro.common.enums;

import lombok.AllArgsConstructor;

/**
 * packageName com.easyadmin.pro.common.enums
 *
 * @author 骑着蚂蚁去上天
 * @version JDK 17
 * @className HttpCodeEnum
 * @date 2024/4/1
 * @description http返回信息枚举
 */
@AllArgsConstructor
public enum HttpCodeEnum {

    // 成功
    SUCCESS(200, "操作成功"),
    // 登录
    NEED_LOGIN(401, "需要登录后操作"),
    NO_OPERATOR_AUTH(403, "无权限操作"),
    SYSTEM_ERROR(500, "系统异常"),
    USERNAME_EXIST(501, "用户名已存在"),
    PHONE_NUMBER_EXIST(502, "手机号已存在"),
    EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    CONTENT_NOT_NULL(506, "评论内容不能为空"),
    FILE_TYPE_ERROR(507, "文件类型错误"),
    USERNAME_NOT_NULL(508, "用户名不能为空"),
    NICKNAME_NOT_NULL(509, "昵称不能为空"),
    PASSWORD_NOT_NULL(510, "密码不能为空"),
    EMAIL_NOT_NULL(511, "邮箱不能为空"),
    NICKNAME_EXIST(512, "昵称已存在"),
    LOGIN_ERROR(505, "用户名或密码错误"),

    LOGIN_VERIFICATION_FAILURE(50000, "登录校验异常"),

    LOGIN_SUCCESS(200, "登录成功"),
    USER_NOT_FOUND(50001, "用户不存在"),

    TOKEN_NOT_FOUND(50002, "未找到Token"),

    RELEVANCE_ROLE_NULL(506, "关联角色不能为空"),

    ROUTER_ID_NOT_FOUND(507, "关联路由不能为空"),

    USER_STATUS_0(508, "用户未启用"),
    TOKEN_PARSING_EXCEPTION(50003, "Token 解析异常"),

    DICT_CODE_EXISTS_ERROR(50004, "字典编码已存在"),

    REPEAT_COMMIT_PREFIX_IS_EMPTY(50006, "重复提交前缀为空"),

    OPERATOR_TOO_FAST_ERROR(50007, "您的操作太快，请稍后重试！"),

    DATA_CODE_EXISTS_ERROR(50005, "数据编码已存在");



    private Integer code;

    private String msg;


    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}